<?php

/**
 * this class provides few functions for working with a data cell of a grid
 * @author		ungerboeck simon <su@militaerversand.at>
 *
 */
class DataCell {
    private $value = null;

    /************************************************************************
     ************************** PUBLIC FUNCTIONS ****************************
     ************************************************************************/

    /**
     * sets the value
     * @param         string         $value
     * @throws        Exception
     */
    public function __construct($value = null) {
       // if ($value != null)
            $this->value = $value;
//         else
//             throw new Exception('your data cell value is null!');
    }


    public function create() {
        $output = '<td>' . $this->value . '</td>';
        return $output;

    }

    /************************************************************************
     **************************** GETTER / SETTER ***************************
     ************************************************************************/


    public function setValue($value) {
        $this->value = $value;
    }


    public function getValue() {
        return $this->value;
    }


    /************************************************************************
     ************************** PRIVATE FUNCTIONS ***************************
     ************************************************************************/
}